pub fn odd_fibnacci_sum(threshold: u32) -> u32 {
    const N: usize= 100010;
    let mut fib = [0; N];
    fib[0] = 0;
    fib[1] = 1;
    let mut sum = 1;
    for i in 2..N {
        fib[i] = fib[i - 1] + fib[i - 2];
        if fib[i] >= threshold {
            break;
        }
        if fib[i] % 2 == 1 {
            sum += fib[i];
        }
    }
    sum
}
